//
//  NetTools.m
//  CareRing
//
//  Created  on 2025/3/19.
//
    

#import "NetTools.h"

@implementation NetTools
+(NSString *)URLEncodeString:(NSString *)string
{
    NSString * encodestring = (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)string,NULL,(CFStringRef)@"!*'();:@&=+$,/?%#[]",kCFStringEncodingUTF8));
  
    
    NSMutableString * outputStr = [NSMutableString stringWithString:encodestring];
    [outputStr replaceOccurrencesOfString:@"%20" withString:@"+" options:NSLiteralSearch range:NSMakeRange(0, [outputStr length])];
    return outputStr;
}
@end
